if __name__ == '__main__':
    str = "DFGHasngaslkgJINMKGL12345!%^&&@遍历美国i每一个字符"
    upper_char_num = 0
    low_char_num = 0
    number_char_num = 0
    chinese_char_num = 0
    other_char_num = 0
    for char in str:
        if char.isupper():
            upper_char_num += 1
        elif char.islower():
            low_char_num += 1
        elif char.isdigit():
            number_char_num += 1
        elif '0x4E00' <= char <= '0x9FA5':
            chinese_char_num += 1
        else:
            other_char_num += 1

print(" 大写字符%d个\n 小写字符%d个\n 数字%d个\n 汉字%d个\n 符号%d个 " %
      (upper_char_num, low_char_num, number_char_num, chinese_char_num, other_char_num)
      )

